﻿

using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace PSAMMatrixCloud.Common.HttpParameterCommon
{
    public static class HttpQuerySimpleResult
    {
        #region 将参数与网关信息发送Get请求，并返回SimpleResult类型的结果

        public static SimpleResult AssembleAndSendGetInfo(SortedDictionary<string, string> sParaTemp, string gateway, string signKey)
        {
            string strRet = HttpParameterSubmit.SendGetInfo(sParaTemp, gateway, signKey);
            return JsonConvert.DeserializeObject<SimpleResult>(strRet);
        }

        public static SimpleResult<T> AssembleAndSendGetInfo<T>(SortedDictionary<string, string> sParaTemp, string gateway, string signKey)
        {
            string strRet = HttpParameterSubmit.SendGetInfo(sParaTemp, gateway, signKey);
            return JsonConvert.DeserializeObject<SimpleResult<T>>(strRet);
        }

        #endregion

    }
}
